﻿<%@ Page Language="VB" AutoEventWireup="false"  MasterPageFile="~/KYC/MasterPageKYC.master" CodeFile="checkCustomerReview.aspx.vb" Inherits="KYC_checkCustomerReview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">

//        $(document).ready(function () {
//            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
//        });

        var hasSubmitted = 0;
        function NoDoubleSubmit() {
            var divMsg = document.getElementById('Processing');
            if (hasSubmitted == 0) {
                hasSubmitted = 0;
                divMsg.style.display = 'block';
                return true;
            }
            return false;
        }
//        var prm = Sys.WebForms.PageRequestManager.getInstance();

//        prm.add_initializeRequest(InitializeRequest);
//        prm.add_endRequest(EndRequest);

        function InitializeRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'wait';
        }

        function EndRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'auto';
        }

    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width: 100%;">
                <tr>
                    <td align="right">
                        <asp:Label ID="lblDept" runat="server"></asp:Label>
                    </td>
                    <td style="text-align: left">
                        <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" CssClass="control"
                            Height="25px" Width="196px">
                        </asp:DropDownList>
                    </td>
                    <td style="text-align: right">
                        <asp:Label ID="lblBranch" runat="server"></asp:Label>
                    </td>
                    <td style="text-align: left">
                        <asp:DropDownList ID="ddlBranch" runat="server" CssClass="control" Height="25px"
                            Width="183px">
                        </asp:DropDownList>
                    </td>
                    <td align="right">
                        ผลิตภัณฑ์</td>
                    <td style="text-align: left">
                        <asp:DropDownList ID="ddlSection" runat="server" CssClass="control" 
                            Height="25px" Width="183px">
                            <asp:ListItem Value="A"  Selected="True">ทั้งหมด</asp:ListItem>
                            <asp:ListItem Value="D">การเงิน</asp:ListItem>
                            <asp:ListItem Value="L">สินเชื่อ</asp:ListItem>
                            <asp:ListItem Value="P">ตั๋วสัญญา</asp:ListItem>
                            <asp:ListItem Value="N">NPA</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;">
                        ความสมบูรณ์ของข้อมูลรู้จักตัวตน</td>
                    <td style="text-align: left">
                        <asp:RadioButtonList ID="rdolIsCustComplete" runat="server" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Value="Y">สมบูรณ์</asp:ListItem>
                            <asp:ListItem Value="N">ไม่สมบูรณ์</asp:ListItem>
                            <asp:ListItem Value="A" Selected="True">ทั้งหมด</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td style="text-align: right;">
                        &nbsp;</td>
                    <td style="text-align: left">
                        &nbsp;</td>
                     <td align="right">
                         &nbsp;</td>
                    <td style="text-align: left">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        ระดับความเสี่ยงด้าน ML/FT</td>
                    <td align="left" valign="top">
                        <asp:RadioButtonList ID="rdoRiskMLFT" runat="server" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Value="N">ไม่ระบุ</asp:ListItem>
                            <asp:ListItem Value="0">0</asp:ListItem>
                            <asp:ListItem Value="1">1</asp:ListItem>
                            <asp:ListItem Value="2">2</asp:ListItem>
                            <asp:ListItem Value="3">3</asp:ListItem>
                            <asp:ListItem Value="A" Selected="True">ทั้งหมด</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td align="right" valign="top">
                      
                    </td>
                    <td align="left" valign="top">
                        &nbsp;</td>
                             <td align="right" valign="top">
                                 &nbsp;</td>
                      <td style="text-align: left">
                          &nbsp;</td>
                </tr>
                <tr>
                    <td align="right">
                        เดือน - ปี
                    </td>
                    <td>
                        <asp:Label ID="lblNEXT_REVIEW" runat="server" Text=""></asp:Label>
                    </td>
                    <td align="right">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: right;">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="ค้นหา" Width="135px" />
                        <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="พิมพ์" 
                        Width="135px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: center">
                        <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text="ไม่พบข้อมูล" Font-Bold="True"
                            Font-Size="30px" Height="30px" Visible="False"></asp:Label>
                        <span id="Processing" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังค้นหาข้อมูล... </span>
                        <asp:GridView ID="grdRiskCustomer" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" Style="margin-right: 0px; margin-bottom: 0px;" Width="100%"
                            AllowPaging="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField HeaderText="No.">
                                  <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNo" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                    </ItemTemplate>
                                      <ItemStyle HorizontalAlign="Left" Width="20px" />
                                </asp:TemplateField>
           
                               
                                 <asp:TemplateField HeaderText="Branch Code">
                                  <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCUSTOMER_OWNER" runat="server" Text='<%# Eval("CUSTOMER_OWNER")%>'></asp:Label>
                                    </ItemTemplate>
                                      <ItemStyle HorizontalAlign="Left" Width="80px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Product">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblProduct" runat="server" Text='<%# Eval("PRODUCT_NAME")  %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="150px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Kyc Info. Review">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblKycInfoReview" runat="server" Text='<%# Eval("NEXT_REVIEW") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="80px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CIF No.">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCIFNo" runat="server" Text='<%# eval("CUSTCODE") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="40px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Personal Identity No. (Citizen ID / Passport)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblIdentityNo" runat="server" Text='<%# eval("UNIQUEID") & " / " & eval("PASSPORT_NO") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="40px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Customer Name (TH / EN)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCustomeName" runat="server" Text='<%# Eval("THFIRSTNAME")& " " & Eval("THMIDNAME")& " " &Eval("THLASTNAME") %>'></asp:Label>
<%--                                         &nbsp;/&nbsp;
                                        <asp:Label ID="lblBranchCode" runat="server" Text='<%# Eval("ENFIRSTNAME")& " " & Eval("ENMIDNAME")& " " &Eval("ENLASTNAME")  %>'></asp:Label>--%>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="150px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Risk Level/ KYC Info Status">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRiskLevel" runat="server" Text='<%# Eval("AMLCDD") & " / " &  Eval("CUST_COMPLETE_FLAG") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="Date">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDate" runat="server" Text='<%# Eval("LASTKYCUPDATEDATE") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="Banch Code / User ID">
                                    <ItemTemplate>
                                        <asp:Label ID="lblKYCBanchCode" runat="server" Text='<%# Eval("BRANCHCODE") %>'></asp:Label>
                                     <%--   &nbsp;/&nbsp;
                                        <asp:Label ID="lblKYCUserID" runat="server" Text='<%# Eval("LASTKYCUPDATEBY") %>'></asp:Label>--%>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Contact Information (Telephone No.)">
                                    <ItemTemplate>
                                        <asp:Label ID="lblContactInfor1" runat="server" Text='<%# Eval("CONTACTPHONE1") %>'></asp:Label>
                                        <br />
                                        <asp:Label ID="lblContactInfor2" runat="server" Text='<%# Eval("CONTACTPHONE2") %>'></asp:Label>
                                         <br />
                                        <asp:Label ID="lblContactInfor3" runat="server" Text='<%# Eval("CONTACTPHONE3") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                </asp:TemplateField>
                               
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <div align="right">
                <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>